package com.gyj.config;

import javax.annotation.Resource;

import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.gyj.interceptor.TenantIntercptor;

@Configuration
@Order(10)
public class InterceptorConfig implements WebMvcConfigurer {
	@Resource
	private TenantIntercptor interceptor;

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(interceptor).addPathPatterns("/**").excludePathPatterns("/user/login/**");
	}
}
